-- card: 9929 from stack: in.1 -- bmap block id: 0 -- flags: 4000 -- background id: 3837 -- name: DeleteMenu -- part 1 (button) -- low flags: 00 -- high flags: A003 -- rect: left=82 top=302 right=324 bottom=182 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Install ----- HyperTalk script ----- on mouseUp if the optionkey is down then pass mouseup put installres(XFCN,DeleteMenu) into it if it is empty then play oops else answer it end mouseUp -- part contents for background part 5 ----- text ----- DeleteMenu -- part contents for background part 10 ----- text ----- 5 -- part contents for background part 6 ----- text ----- DeleteMenu allows you to delete any menus you've added to HyperCard using the NewMenu* XFCN. Failure to delete added menus could lead to severe problems in memory and crash HyperCard! The menu reference number you provide to to DeleteMenu should be the same number that was returned by NewMenu*. Do NOT, however, call DeleteMenu to delete menus that you've already deleted! You need to balance the calls for each menu. Call NewMenu* ONCE to create a menu (usually in either openStack, openBackground or openCard), and call DeleteMenu ONCE to delete it (in the matching closeStack, closeBackground, or closeCard). Repeat as neccessary. Rinse. For the best example of use see the sample script provided in NewMenu*. All the credit, (even the descriptions above) go to the creator of this ingenious XFCN: Nine to Five Software Company P.O. Box 915 Greenwood, IN 46142 (317) 887-2154 & Michael Long See also CheckMenu*, EnableMenu*, NewMenu*, and ChangeMenu*. -- part contents for background part 7 ----- text ----- Syntax: put DeleteMenu(menuNumber) into MenuIDGlobal menuNumber is the number returned by the original newMenu call.